﻿@model Site.Models.RegisterDTO

@{
    ViewBag.Title = "Register";
    if (ViewBag.Message != null)
    {
        <script> alert("@ViewBag.Message");</script>
    }
}

<h2>Register</h2>
@{

    if (Session["Username"] == null)
    {
        using (Html.BeginForm("RegisterUser", "Home"))
        {

            @Html.LabelFor(model => model.Username)
            @Html.TextBoxFor(model => model.Username)
            @Html.LabelFor(model => model.Password)
            @Html.PasswordFor(model => model.Password)
            <input type="submit" value="Register" />

        }
    }
    <p> Return to @Html.ActionLink("Home", "Index", "Home")</p>
}